package com.xcity.game.currency;

import org.slf4j.Logger;

import com.xcity.db.entity.Player;
import com.xcity.game.common.LogCause;
import com.xcity.game.io.Serializer;
import com.xcity.pomelo.push.SyncPush;

import naga.x.game.GameUnit;

public interface ICurrency extends Serializer {
	
	Logger LOG = GameUnit.LOG;

//	boolean addValue(byte val, String cause);
//	boolean addValue(short val, String cause);
	boolean addValue(int val, String cause);
	boolean addValue(long val, String cause);
//	boolean addValue(float val, String cause);
//	boolean addValue(double val, String cause);
	
//	boolean addValue(byte val, LogCause cause);
//	boolean addValue(short val, LogCause cause);
	boolean addValue(int val, LogCause cause);
	boolean addValue(long val, LogCause cause);
//	boolean addValue(float val, LogCause cause);
//	boolean addValue(double val, LogCause cause);
	
//	boolean decValue(byte val, String cause);
//	boolean decValue(short val, String cause);
	boolean decValue(int val, String cause);
	boolean decValue(long val, String cause);
//	boolean decValue(float val, String cause);
//	boolean decValue(double val, String cause);
	
//	boolean decValue(byte val, LogCause cause);
//	boolean decValue(short val, LogCause cause);
	boolean decValue(int val, LogCause cause);
	boolean decValue(long val, LogCause cause);
//	boolean decValue(float val, LogCause cause);
//	boolean decValue(double val, LogCause cause);
	
//	byte getByteValue();
//	short getShortValue();
	int getIntValue();
	long getLongValue();
//	float getFloatValue();
//	double getDoubleValue();
	
	void init(Player player);
	
	/**
	 * 同步id
	 * @return
	 * @see SyncPush
	 */
	short getSyncId();
	
	/**
	 * 值增加时日志记录格式（默认为空，不记录）<br/>
	 * [TAG]ID[{}]OLD[{}]NEW[{}]CAUSE[{}]
	 * @return
	 */
	String getValueAddLogFormat();
	
	/**
	 * 值减少时日志记录格式（默认为空，不记录）<br/>
	 * [TAG]ID[{}]OLD[{}]NEW[{}]CAUSE[{}]
	 * @return
	 */
	String getValueDecLogFormat();
	
}
